<?php
namespace app\index\model;
use think\Model;
use think\DB;



class Users extends Model
{
	protected $pk = 'id';
	protected $table = 'tp_admin';

    public function getRole()
    {		
    	return Db::name("auth_group")->where(['status'=>1])->order("id desc")->select();
    }

    public function getRoledel($id)
    {
        return Db::name("auth_group")->where(['id'=>$id])->delete();
    }

    public function getPermissionList()
    {
        return Db::name("auth_rule")->paginate(20);
    }

}

